package com.ibigcat.module.system.enums.common;

import lombok.Getter;

/**
 * 功能: 异常字段的封装  --层
 * <p>异常字段的封装  --层</p >
 * <ul>
 * <li>{@link ExceptionEnum} connect to {@link ExceptionEnum}</li>
 * </ul>
 *
 * @Program: saas-server
 * @Date: 2022-04-24 17:45
 * @Version 1.0
 * @Author mys
 */
@Getter
public enum ExceptionEnum {
    // 登录注册相关异常
    NON_PHONE("auth", "500", "未传入手机号"),
    NON_VERIFY_CODE("auth", "500", "验证码不能为空！"),
    NULL_VERIFY_CODE("auth", "500", "验证码不存在！"),
    WRONG_VERIFY_CODE("auth", "500", "验证码不正确！"),
    WRONG_IMAGE_CODE("auth", "500", "图形验证码错误，请重新输入"),
    WRONG_SMS_CODE("auth", "500", "验证码错误，请重新输入"),
    WRONG_SMS_CODE_EXPIRE("auth", "500", "验证码已失效，请重新获取验证码"),
    REPEAT_PHONE("auth", "500", "手机号已绑定账号"),
    PHONE_EXIST("auth", "500", "该手机号已存在"),
    WRONG_DATA("auth", "500", "数据校验失败"),
    USER_NOT_EXIST("auth", "500", "该手机号未被注册"),
    PWD_MODIFY_FAIL("auth", "500", "密码修改失败"),
    ENTERPRISE_EXIST("auth", "500", "该企业已被注册"),
    ACCOUNT_EXIST("auth", "500", "该账号已被注册"),
    PLEASE_RETRY("auth", "500", "验证失败，请重新输入"),
    WRONG_PWD_OR_ACCOUNT("auth", "500", "账号名或登录密码不正确，请重试"),
    REPEAT_PWD("basis", "500", "新密码与旧密码重复，请重新输入"),
    ERR_SEND_SMS("auth", "500", "短信发送失败"),
    ACCOUNT_DISABLED("auth", "9004", "您的账号已被禁用，无法登陆"),
    WRONG_PHONE_OR_ACCOUNT("auth", "500", "电话错误或无账户"),
    EMPTY_MSG_TEMPLATEID("auth", "500", "未配置短信模板"),
    USER_NOT_FOUND("auth", "500", "获取主数据用户信息失败!");

    String moduleName;
    String errorCode;
    String userTip;

    ExceptionEnum(String moduleName, String errorCode, String userTip) {
        this.moduleName = moduleName;
        this.errorCode = errorCode;
        this.userTip = userTip;
    }
}
